Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stable UNIX users: functionality #51200

Merged
merged 12 commits into from
Jan 29, 2025
Merged

Conversation

espadolini
Copy link
Contributor

@espadolini espadolini commented Jan 17, 2025

This PR adds the use of fallback UIDs for host user creation in the Teleport SSHd and a tctl subcommand (tctl stable-unix-users ls) to list the persisted usernames and their UIDs. This PR also adds an audit log event to the API, emitted when a new username is written, and support for configuring the feature in the auth server's config file.

Related RFD: #50414
Part of #50292

@espadolini espadolini added the no-changelog Indicates that a PR does not require a changelog entry label Jan 17, 2025
@github-actions github-actions bot requested review from kimlisa and rudream January 17, 2025 21:39
@github-actions github-actions bot added audit-log Issues related to Teleports Audit Log size/md tctl tctl - Teleport admin tool ui labels Jan 17, 2025
@kimlisa kimlisa removed their request for review January 21, 2025 19:34
lib/auth/stableunixusers/stableunixusers.go Outdated Show resolved Hide resolved
lib/srv/sess.go Outdated Show resolved Hide resolved
return nil, trace.BadParameter("missing Emitter")
}
if c.Logger == nil {
return nil, trace.BadParameter("missing Logger")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use slog.Default instead of failing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the one place where we call this in real code we have access to the logger from the auth server - we can let the caller specify a default or noop logger, IMO.

Base automatically changed from espadolini/stable-unix-user-api to master January 28, 2025 17:27
@espadolini espadolini force-pushed the espadolini/stable-unix-user branch from 58c1a94 to 8fe2aba Compare January 28, 2025 17:35
@espadolini
Copy link
Contributor Author

@eriktate friendly ping

@espadolini espadolini removed the request for review from rudream January 28, 2025 17:36
@espadolini espadolini added this pull request to the merge queue Jan 29, 2025
Merged via the queue into master with commit cc77fce Jan 29, 2025
46 checks passed
@espadolini espadolini deleted the espadolini/stable-unix-user branch January 29, 2025 18:38
espadolini added a commit that referenced this pull request Jan 29, 2025
* wiring the API client through

* tctl stable-unix-users ls

* stable UID fallback for Teleport SSHD

* stable_unix_user.create event

* fix-license

* Require and test audit log message

* Add stable_unix_user_config to fileconf

* Avoid saying "fallback UID" in logs

* Avoid saying "fallback UID" in error messages

* Avoid racing writes in the mock emitter

* pnpm lint-fix

* fix lib/auth tests that broken during rebase
This was referenced Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit-log Issues related to Teleports Audit Log no-changelog Indicates that a PR does not require a changelog entry size/md tctl tctl - Teleport admin tool ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants